Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add f16 and f128 as simd types in LLVM #127487

Merged
merged 1 commit into from
Jul 11, 2024
Merged

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 8, 2024

@sayantn is working on adding SIMD for f16 and hitting the FloatingPointVector error. This should fix it and unblock adding support for simd_fma and simd_fabs in stdarch.

SIMD work: rust-lang/stdarch#1605

@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2024

r? @cjgillot

rustbot has assigned @cjgillot.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 8, 2024
@tgross35
Copy link
Contributor Author

tgross35 commented Jul 8, 2024

@rust-lang/wg-gcc-backend I am not sure how GCC types are named, what should the equivalent update be here?

https://github.com/tgross35/rust/blob/506512391b1a75ae450d36c9420978402a91abcc/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs#L594-L605

@GuillaumeGomez
Copy link
Member

Support was added very recently on our side: https://github.com/antoyo/rustc_codegen_gcc/pull/17/files

@tgross35
Copy link
Contributor Author

tgross35 commented Jul 8, 2024

With this I am assuming that e.g. llvm.fabs.v32f16/llvm.fabs.v4f128 are the correct LLVM names, @sayantn any chance you could double check that?

@GuillaumeGomez it doesn't look like the simd support landed there, do you know what the appropriate suffixes for the intrinsics are for GCC? I am not sure where this would be documented. (should be okay to leave this unimplemented in GCC for now if there isn't a straightforward answer)

@sayantn
Copy link
Contributor

sayantn commented Jul 8, 2024

@tgross35 that is the correct name as in LangRef. The GCC suffix is l for __float128. Could not find info about __float16

@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2024

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@tgross35
Copy link
Contributor Author

tgross35 commented Jul 8, 2024

Great thanks for confirming, I did the GCC updates.

@tgross35
Copy link
Contributor Author

tgross35 commented Jul 8, 2024

Ah, I see you edited your comment about GCC 😆 I just dropped that patch, I will take a look but we can just add it later if it's not well supported yet.

@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor Author

tgross35 commented Jul 8, 2024

🤔 failure looks spurious, will force push something to retry

@Amanieu
Copy link
Member

Amanieu commented Jul 11, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jul 11, 2024

📌 Commit 04caa55 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 11, 2024
@bors
Copy link
Contributor

bors commented Jul 11, 2024

⌛ Testing commit 04caa55 with merge bcf1f6d...

@bors
Copy link
Contributor

bors commented Jul 11, 2024

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing bcf1f6d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 11, 2024
@bors bors merged commit bcf1f6d into rust-lang:master Jul 11, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 11, 2024
@tgross35 tgross35 deleted the f16-f128-simd branch July 11, 2024 16:25
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bcf1f6d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 704.358s -> 703.929s (-0.06%)
Artifact size: 328.86 MiB -> 328.72 MiB (-0.04%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants